package com.jf3q.front.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jf3q.common.domain.EduCourse;
import com.jf3q.common.mapper.EduCourseMapper;
import com.jf3q.front.service.CourseService;
import com.jf3q.common.vo.CourseWebVo;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
@CacheConfig(cacheNames = "course")
public class CourseServiceImpl extends ServiceImpl<EduCourseMapper, EduCourse> implements CourseService {
    @Override
    @Cacheable(key="#courseId")
    public CourseWebVo getBaseCourseInfo(String courseId) {

        return baseMapper.getBaseCourseInfo(courseId);

    }
}
